class Employee:
    # 类变量，初始化为0，用于记录实例数量
    total_employees = 0

    def __init__(self):
        # 每次实例化时增加total_employees的值
        Employee.total_employees += 1

    @classmethod
    def get_total_employees(cls):
        # 返回当前的实例数量
        return cls.total_employees


# 实例化几个Employee对象
emp1 = Employee()
emp2 = Employee()
emp3 = Employee()

# 输出总共创建了多少个Employee对象
print(Employee.get_total_employees())
